echo "Computed By Wei on 2014/07/06 at school"
echo "The format of each data line:"
echo "col0: % index kept"
echo "col1: # of unpruned TOP10 document results retained@10"
echo "col2: # of unpruned TOP10 postings retained in pruned index"
echo "col3: total # of TOP10 document results in unpruned index"
echo "col4: total # of TOP10 postings in unpruned index"
echo "col5: % of unpruned TOP10 document results retained@10"
echo "col6: % of unpruned TOP10 postings retained in pruned index"
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=ALL numOfQueries=5000"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_ALL_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_ALL_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_ALL_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_ALL_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=1 numOfQueries=100"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_1_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_1_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_1_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_1_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=2 numOfQueries=783"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_2_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_2_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_2_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_2_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=3 numOfQueries=1204"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_3_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_3_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_3_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_3_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=4 numOfQueries=1205"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_4_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_4_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_4_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_4_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=5 numOfQueries=787"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_5_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_5_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_5_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_5_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=6 numOfQueries=469"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_6_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_6_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_6_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_6_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=7 numOfQueries=212"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_7_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_7_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_7_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_7_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=8 numOfQueries=117"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_8_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_8_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_8_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_8_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=9 numOfQueries=48"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_9_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_9_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_9_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_9_20140705) | join - tempPercentage)
echo

echo "dataset=gov2 dynamicWeight=0 queryLength=10 numOfQueries=26"
awk '{print $6,$2,$3,$5,$4,$2/$5,$3/$4}' <(join <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10DocumentResultReturned:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_10_20140705) <(awk 'BEGIN {counter=0} {if($1 == "numOfOriginalTOP10PostingsRetained:") print counter++,$2;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_10_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "postings:") print counter++,$5;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_10_20140705) | join - <(awk 'BEGIN {counter=0} {if($3 == "top10" && $4 == "document") print counter++,$6;}' < evaluate_OVERLAP_GOV2_cutoff1000_queryLength_10_20140705) | join - tempPercentage)
echo

